package com.elock.service;

/*
 * 
 */

import java.util.List;
import java.util.Map;

import com.elock.base.core.Pageable;
import com.elock.base.core.service.BaseService;
import com.elock.entity.SaleOrg;

/**
 * Service - 机构
 */
public interface SaleOrgBaseService extends BaseService<SaleOrg> {

	public SaleOrg getCurrentSaleOrg();

	/**
	 * 根据条件查找机构树
	 * 
	 * @param name
	 * @param isEnabled
	 * @return
	 */
	public List<SaleOrg> findTree(String name, Boolean isEnabled);

	/**
	 * 根据条件查找下级机构
	 * 
	 * @param name
	 * @param isEnabled
	 * @param saleOrg
	 * @return
	 */
	public List<SaleOrg> findChildren(String name, Boolean isEnabled, SaleOrg saleOrg);

	public List<Map<String, Object>> findList(String saleOrgName, String sn, Boolean isEnabled, Pageable pageable);

	public List<Map<String, Object>> findChildren(Long parentId);

	public SaleOrg findByStoreMember(Long storeMemberId);

	public void deleteSaleOrg(SaleOrg saleOrg);

	public String saleOrgAuth();
	
	public int sameSaleOrgSn(String sn, Long id);
}
